<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        .box{margin-bottom:20px;}
        .box img{width:100px;}
    </style>
</head>
<body>
    
</body>
<script>

    // var msg1 = "教室";
    // var msg2 = "游戏";
    // var src = "https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png";
    // var str = "今天我在<b>" + msg1 + "</b>玩'" + msg2 + "'<img src='" + src + "'>";

    var data = [{
        name:"张三",
        address:"楼道",
        do:"抽烟",
        src:"https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png"
    },{
        name:"李四",
        address:"教室",
        do:"玩游戏",
        src:"https://inews.gtimg.com/newsapp_bt/0/12171811596_909/0"
    },{
        name:"阿亮",
        address:"厕所",
        do:"打架",
        src:"https://img0.baidu.com/it/u=2538904678,3253492312&fm=253&app=120&size=w931&n=0&f=JPEG&fmt=auto?sec=1664470800&t=5204533db7cf50edbc70f91e7eb9cff3"
    }];

    var str = "";

    data.forEach(function(val){
        // val.name
        // val.address
        // val.do
        // val.src
        str += "<div class='box'>今天"+ val.name +"在"+ val.address +"<mark>"+ val.do +"</mark><img src='"+ val.src +"'></div>";
    })


    document.write(str);
    
</script>
</html>